package com.bootdo.goods.dao;

import com.bootdo.goods.domain.TGoodsAllocationDO;

import com.bootdo.goods.domain.dto.GoodsAllocationDto;
import groovy.transform.PackageScope;

import java.util.Date;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 货位表
 * @author chglee
 * @email 1992lcg@163.com
 * @date 2018-04-24 14:13:19
 */
@Mapper
public interface TGoodsAllocationDao {

	TGoodsAllocationDO get(Long allocationId);

	List<TGoodsAllocationDO> list(Map<String, Object> map);
	
	int count(Map<String, Object> map);
	
	int save(TGoodsAllocationDO tGoodsAllocation);
	
	int update(TGoodsAllocationDO tGoodsAllocation);
	
	int remove(Long allocation_id);
	
	int batchRemove(Long[] allocationIds);

	TGoodsAllocationDO getAllocation(Long providerId);
	
	void updateOne(@Param("str")String str,@Param("ids")Long ids);

	TGoodsAllocationDO getTargetAllocation(String trayCode);

	GoodsAllocationDto getTargetAllocationGoods(String trayCode);

	void updateGoodids(@Param("goodsId")Long goodsId, @Param("num")int num,@Param("date")Date date,@Param("eid")Long eid);

	void deleteOne(Long allocationId);
	
	TGoodsAllocationDO selectAll(@Param("goodsId")Long goodsId,@Param("goodsNumber")int goodsNumber, @Param("providerId")Long providerId);

	TGoodsAllocationDO selectOne(Long providerId);

	TGoodsAllocationDO getOne(String allocationNumber);

	TGoodsAllocationDO selectGoodsMsg(String allocationNumber, Long goodsId);


	/**
	 * 查询货位商品
	 * @param allocationId
	 * @return
	 */
	List<GoodsAllocationDto> getAllocationGoods(Long allocationId);
	List<GoodsAllocationDto> getAllocationAloneGoods(Long allocationId);
}
